Overview
The dictionary contains more than 2 million English collocations.
The API looks up a word in a dictionary and returns
- all collocations ordered by significance
- up to 3 example sentences for each collocation
- the syntactic relation of each collocation
How to use Linguatools Collocation API
Connect to API
Endpoint and Parameters
Blue color marks version 2 of the API.
v1: GET /?lang={lang}&query={word}&min_sig={significance}&relation={relation}
v2: GET /?lang={lang}&query={word}&min_sig={significance}&relation={relation}&pos={pos}
parameter | description | parameter value |
---|---|---|
query | any word (case insensitive) | e.g. change |
lang | One of the following language ISO 639-1 codes (case sensitive): |
en
(more in progress) |
relation | One of the following relations (case sensitive, optional): Blue color marks version 2 of the API.
|
V:obj:N
V:prep:N
V:obj1+2:N
V:obj+prep:N
V:subj:N
V:sc:V
,
V:sc:Vinf
N:mod:A
,
N:mod:Adj
N:prep:N
N:nn:N
V:mod:A
,
V:mod:Adv
A:mod:A
,
Adj:mod:Adv
|
min_sig | any number as the minimum significance (optional). Will return only collocations with
significance
>= min_sig. |
1,2,3333,75334
, etc. |
pos | One of the following Part Of Speech (case sensitive): V
Vinf
N
Adj
Adv
| e.g.
V
|
Test the API
You can test the API and develop your own application – for free after sign up in RapidAPI
Test the test API with:
- lang:
en
- query:
smoke
- relation:
V:obj:N
(optional) - pos:
V
(optional, only in version 2)
http request (API)
You get full access (free & paid) to the full database with 2 million English collocations if you sign up in RapidAPI.
Pricing
The „BASIC“ plan with 1.000 requests/month is free.
API response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | [ { "id":1058213, "collocation":"to smoke pipe", "relation":"V:obj:N", "significance":48496.0, "basisword":"pipe", "examples": [ "Breakfast was over , and a number were <b>smoking</b> <b>pipes</b> .", "The tramp was sitting outside , <b>smoking</b> a <b>pipe</b> .", "The old man was standing outside , <b>smoking</b> a <b>pipe</b> ." ] } ] |
In raw format you will see the html tags <b> and </b> as \u003cb\u003e and \u003c/b\u003e
http request & code snippets
RapidAPI provides programming examples for many programming languages how to use the API.
Terms of Use
Link: Terms of Use
Examples of use
1. Query the complete linguatools collocations database online:
URL: http://www.linguatools.de/kollokationen-en/
2. We make use of collocations in our online tool Gramomat:
URL: https://gramomat.com/ [A click into the object field to see the suggested collocations]
3: Collocations as word clouds on fluentwords.
Other language APIs by linguatools: https://linguatools.org/language-apis/